//
//  WmcWatermarkSelectFooterView.swift
//  YPWatermarkCamera
//
//  Created by 赵新 on 2022/4/24.
//

import UIKit

class WmcWatermarkSelectFooterView: WmcBaseCollectionReusableView {
    lazy var promptBtn: UIButton = {
        let attStr = "没找到想要的水印？联系我们".yp.makeAttributed { make in
            make.set(font: 14)
                .set(foregroundColor: UIColor.wmc_grayH2_323233, range: 0 ..< 9)
                .set(foregroundColor: UIColor.wmc_mainTheme, range: 9 ..< 13)
        }

        let btn = UIButton()
        btn.setAttributedTitle(attStr, for: .normal)
        btn.titleLabel?.textAlignment = .center
        return btn
    }()

    override func makeUI() {
        if let delegate = YPWmcManager.shared.uiDelegate.selectWatermarkDelegate {
            if delegate.watermarkSelectShowBottomContantUs(.current) {
                addSubview(promptBtn)
                promptBtn.snp.makeConstraints { make in
                    make.top.left.right.equalToSuperview()
                    make.bottom.equalTo(-10)
                }
            }
        } else {
            addSubview(promptBtn)
            promptBtn.snp.makeConstraints { make in
                make.top.left.right.equalToSuperview()
                make.bottom.equalTo(-10)
            }
        }
    }
}
